<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/jquery-2.1.1.min.js"></script>
    <script src="/js/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <link rel="stylesheet" href="/js/bootstrap-3.3.7-dist/css/bootstrap.css">
    <link rel="stylesheet" href="/js/bootstrap-treeview/bootstrap-treeview.min.css">
    <script src="/js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
    <script src="/js/bootStrap-addTabs/bootstrap.addtabs.min.js"></script>
    <link rel="stylesheet" href="/js/bootStrap-addTabs/bootstrap.addtabs.css">

</head>
<script type="text/javascript">
    $(function () {
        queryTree();
    })
    function queryTree() {
        $.ajax({
            url:"../tree/queryTree",
            success:function(result){
                $('#tree').treeview({
                    data:result,
                    onNodeSelected: function(event, data) {
                        $.addtabs({iframeHeight: 1000});
                        if(data.nodes!=null){return;}
                        if(data.href==null){return;}
                        $.addtabs.add({
                            id:data.id,
                            title:data.text,
                            url:"../view/toView?address="+data.href
                        });
                    }
                });
            }
        })
    }
</script>
<body>
<div class="container-fluid">
    <div class="row">
        <div id="tree" class="col-md-3"></div>
        <!-- 选项卡 -->
        <div id="myTabs">
            <div class="col-md-9">
                <ul class="nav nav-tabs" >
                </ul>
                <div class="tab-content">
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>